]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't expose "Add as favorite" for window-backed apps
authorColin Walters <walters@verbum.org>
Thu, 11 Aug 2011 10:06:38 +0000 (06:06 -0400)
committerColin Walters <walters@verbum.org>
Thu, 11 Aug 2011 14:11:22 +0000 (10:11 -0400)
We don't know how to do it.  Similarly, don't allow New Window.

https://bugzilla.gnome.org/show_bug.cgi?id=648149

js/ui/appDisplay.js

index a69b677b62cea49244aae0e5aecf7e7a3dd8249a..291e3d63b036bcbecf30c36c597907d38e759036 100644 (file)
@@ -673,17 +673,18 @@ AppIconMenu.prototype = {
             item._window = windows[i];
         }
 
-        if (windows.length > 0)
-            this._appendSeparator();
-
-        let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
+        if (!this._source.app.is_window_backed()) {
+            if (windows.length > 0)
+                this._appendSeparator();
 
-        this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
-        this._appendSeparator();
+            let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
 
-        this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites")
-                                                                    : _("Add to Favorites"));
+            this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
+            this._appendSeparator();
 
+            this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites")
+                                                                : _("Add to Favorites"));
+        }
     },
 
     _appendSeparator: function () {